package com.cszy.yydqbfq.dialog;

import android.animation.AnimatorSet;
import android.content.Context;
import android.content.Intent;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.annotation.NonNull;


import com.cszy.yydqbfq.R;
import com.cszy.yydqbfq.ui.activity.ActivitySettingPwdActivity;
import com.hjq.shape.view.ShapeTextView;


public class FcmFirstDialog extends BaseDialog{
    private TextView tv_setting;
    private TextView btn_fcm;

    private ShapeTextView iv_close;
    private Context mConText;
    public FcmFirstDialog(@NonNull Context context) {
        super(context);
        mConText=context;
    }

    @Override
    protected float setWidthScale() {
        return 0.8f;
    }

    @Override
    protected AnimatorSet setEnterAnim() {
        return null;
    }

    @Override
    protected AnimatorSet setExitAnim() {
        return null;
    }

    @Override
    protected void init() {
        btn_fcm=findViewById(R.id.tv_open_fcm);
        iv_close = findViewById(R.id.btn_ok);
        //进入防沉迷设置界面
        btn_fcm.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                mConText.startActivity(new Intent(mConText, ActivitySettingPwdActivity.class));
//                dismiss();
            }
        });

        //我知道了
        iv_close.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                dismiss();
            }
        });
    }

    @Override
    protected int getContentViewId() {
        return R.layout.dialog_fangchenmi;
    }
}
